import logging

import yagmail


def log_set():
    logging.basicConfig(level=logging.DEBUG,filename='log.txt',format='%(message)s / %(asctime)s')
def send_mail(file):
    main=yagmail.SMTP(user="2624580490@qq.com",password="fvzzughsqlpjechj",host="smtp.qq.com")
    main.send(to="2624580490@qq.com",subject="测试报告",contents="内容",attachments=file)